home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / remote / NXProxy.h < prev    next >
Text File  |  1992-12-16  |  2KB  |  67 lines

  1. /*  NXProxy.h
  2.     Copyright 1992, NeXT, Inc.
  3. */
  4.  
  5. #import <stdlib.h>
  6. #import <stdarg.h>
  7. #import <objc/HashTable.h>
  8. #import <objc/Protocol.h>
  9. #import <remote/NXConnection.h>
  10. #import <remote/transport.h>
  11. #import <machkit/reference.h>
  12.  
  13.  
  14.  
  15.  
  16. /*****************  Distributed Objects     **************************/
  17.  
  18. typedef enum  {
  19.     NX_REMOTE_EXCEPTION_BASE = 11000,
  20.     NX_couldntSendException = 11001,
  21.     NX_couldntReceiveException = 11002,
  22.     NX_couldntDecodeArgumentsException = 11003,
  23.     NX_unknownMethodException = 11004,
  24.     NX_objectInaccessibleException = 11005,
  25.     NX_objectNotAvailableException = 11007,
  26.     NX_remoteInternalException = 11008,
  27.     NX_multithreadedRecursionDeadlockException = 11009,
  28.     NX_destinationInvalid = 11010,
  29.     NX_originatorInvalid = 11011,
  30.     NX_sendTimedOut = 11012,
  31.     NX_receiveTimedOut = 11013,
  32.     NX_REMOTE_LAST_EXCEPTION = 11999
  33. } NXRemoteException;
  34.  
  35.  
  36. /* we keep a NXProxy for each Object, whether remote or local,
  37.  * that has been communicated over the wire.
  38.  */
  39.  
  40. @interface NXProxy <NXTransport,NXReference> {
  41. @private
  42.     Class           isa;
  43.     unsigned        name;           /* object name */
  44.     unsigned        wire;           /* is this a stub for a local object? */
  45.     NXConnection    *conn;          /* what conn are we registered on? */
  46.     Protocol        *proto;         /* what protocol do we serve? */
  47.     unsigned        refcount;       /* how many references have been made? */
  48.     void            *knownSelectors;    /* cache */
  49. }
  50.  
  51.  
  52. - setProtocolForProxy:(Protocol *)proto;
  53.  
  54. - (BOOL) isProxy;   // always returns YES
  55.  
  56. - connectionForProxy;
  57. - (unsigned) nameForProxy;
  58.  
  59. - freeProxy;
  60. @end
  61.  
  62. @interface Object (IsProxy)
  63. - (BOOL) isProxy;   // always returns NO
  64. @end
  65.  
  66.  
  67.